package org.apache.mina.protocol.dns.nameserver;

import java.net.SocketAddress;
import java.util.List;

import org.apache.mina.protocol.dns.DnsResolver;

/**
 * Configuration interface.
 * 
 * Used to configure a {@link DnsResolver}.
 *
 * @author The Apache MINA Project (dev@mina.apache.org)
 * @version $Rev: 81 $, $Date: 2008-02-20 16:33:42 +0000 (Wed, 20 Feb 2008) $
 */
public interface NameServerConfiguration {

    /**
     * DNS standard port. Used to construct {@link SocketAddress} for
     * name servers.
     */
    static final int DNS_PORT = 53;

    /**
     * Access the list of name servers.
     * The first one in the list will be supposed to be the master 
     * DNS server.
     * 
     * @return a list of name server addresses
     */
    List<SocketAddress> getNameServers();

    /**
     * Access the list of configured search domains. These domains
     * will be used to resolve local hosts. 
     * 
     * @return a list of search domains
     */
    List<String> getDomains();

    /**
     * Reports the state of the configuration object.
     * 
     * @return true if the configuration has been read 
     *         without problems
     */
    boolean isOk();

}
